Controlling the Flow of a Function or Program

When you run a program or evaluate a function, the program lines are executed in sequential order. However, some commands alter the program flow. For example:

Control structures such as If...EndIf commands use a conditional test to decide which part of a program to execute.
Loop commands such as For...EndFor repeat a group of commands.